nana-4 [Mon, 25 Nov 2019 15:39:33 +0000 (00:39 +0900)]
Adwaita: Avoid directly coloring labels wherever possible
Directly coloring labels can create a lot of unintended behaviors.
Unfortunately we can't avoid directly coloring `label:disabled` because
it can be used individually. This, however, tries to inherit color from
the parent element of labels wherever possible.
Fixes https://gitlab.gnome.org/GNOME/gtk/issues/1643
Benjamin Otte [Sat, 23 Nov 2019 18:33:36 +0000 (19:33 +0100)]
testsuite: Fix expected test output
This reverts part of
91497348bf1ea90ef1056bdc8727bbea645c21e3
Benjamin Otte [Sat, 23 Nov 2019 18:01:28 +0000 (19:01 +0100)]
cssprovider: Don't add empty rulesets
This change was lost during the parser changes, but the newly added test
exposes it.
And fix the expected error, the syntax has changed.
Alexandr Miloslavskiy [Thu, 21 Nov 2019 19:26:22 +0000 (20:26 +0100)]
Fix crash in parse_border()
The bug was introduced in commit:
9b7640b8 by Benjamin Otte, 2012-03-26 17:24:02
styleproperty: Make _gtk_style_property_parse_value() return a CssValue
In that commit, `values` changed from `GValue*` to `GtkCssValue**`,
but one `!G_IS_VALUE (&values[8])` was left untouched. As a result,
if `border` shorthand contains anything after color, it might crash,
depending on memory layout.
New test included.
Fixes: #751
Benjamin Otte [Sat, 23 Nov 2019 17:09:15 +0000 (17:09 +0000)]
Merge branch 'wip/otte/builder' into 'master'
Reorganize various GtkBuilder things
See merge request GNOME/gtk!1204
Benjamin Otte [Fri, 22 Nov 2019 07:29:32 +0000 (08:29 +0100)]
builder: Make the struct private
We don't want anyone to subclass it - if we want to allow bindings to
extend GtkBuilder, we will be using delegate objects/functions for it.
Benjamin Otte [Fri, 22 Nov 2019 07:25:29 +0000 (08:25 +0100)]
builder: Remove get_type_from_name() vfunc
Benjamin Otte [Fri, 22 Nov 2019 07:06:35 +0000 (08:06 +0100)]
builder: Improve signal connecting
- Propagate the error back to the parser, so we get a proper GError
instead of a g_warning().
- Connect closures by id, don't construct a name from the ids so that
glib can take it apart again.
Benjamin Otte [Fri, 22 Nov 2019 05:31:33 +0000 (06:31 +0100)]
builder: Connect signals automatically
gtk_builder_connect_signals() is no longer necessary, because all the
setup that made it necessary to have this extra step is now done
automatically via the closure functions.
Benjamin Otte [Fri, 22 Nov 2019 00:42:48 +0000 (01:42 +0100)]
reftests: Switch to gtk_builder_set_closure_func()
Benjamin Otte [Fri, 22 Nov 2019 05:54:52 +0000 (06:54 +0100)]
widget: Change templates to use closure functions
... instead of connect functions.
Benjamin Otte [Thu, 21 Nov 2019 23:18:19 +0000 (00:18 +0100)]
builder: Add gtk_builder_set_closure_func()
This allows bindings and templates to setup a way to create closures.
Benjamin Otte [Thu, 21 Nov 2019 20:30:38 +0000 (21:30 +0100)]
widget: Reinstate custom closure func
It turns out it ws used in various places.
Benjamin Otte [Thu, 21 Nov 2019 20:20:16 +0000 (21:20 +0100)]
builder: Add gtk_builder_create_closure()
This will be the future way to connect signals automatically (and be
used for other things, too).
For now, gtk_builder_connect_signals_default() is ported to use it.
Benjamin Otte [Thu, 21 Nov 2019 18:36:06 +0000 (19:36 +0100)]
builder: Remove user_data argument from gtk_builder_connect_signals()
This is pretty unused and gets in the way of the next steps.
A potential side effect is that for templates the widget was passed as
the user data argument. If that turns out to be important, we have to
special case that situation.
Benjamin Otte [Mon, 18 Nov 2019 03:56:36 +0000 (04:56 +0100)]
builder: Remove application setter/getter
It's unused and doesn't belong to GtkBuilder.
Benjamin Otte [Mon, 18 Nov 2019 03:52:35 +0000 (04:52 +0100)]
builder: Carry the module as part of the GtkBuilder object
This way, we don't open the module in every place we want to look up
functions.
Benjamin Otte [Mon, 18 Nov 2019 00:11:24 +0000 (01:11 +0100)]
builder: Fix typo in docs
Benjamin Otte [Tue, 5 Nov 2019 22:46:01 +0000 (23:46 +0100)]
testsuite: Print useful statement on notify test error
... and don't instantly abort, test the rest of the properties, too.
Benjamin Otte [Thu, 21 Nov 2019 14:39:48 +0000 (15:39 +0100)]
types: Remove and unused typedef
GtkRcPropertyParser is gone.
Benjamin Otte [Sun, 17 Nov 2019 01:39:17 +0000 (02:39 +0100)]
settings: Remove RC property parsers
They've not been used for a long time and the APIs where they could
reasonably be used have been gone for as long.
Benjamin Otte [Sun, 17 Nov 2019 01:34:38 +0000 (02:34 +0100)]
settings: Remove code dealing with property parsers
They only remained in private code where they were always set to NULL.
Sam Hewitt [Tue, 19 Nov 2019 16:46:18 +0000 (11:46 -0500)]
adwaita: level bar refinements
- shave a few pixels off large level bar
- thinner discrete level bar
Timm Bäder [Tue, 19 Nov 2019 10:06:08 +0000 (11:06 +0100)]
gl renderer: Remove unused function
Timm Bäder [Tue, 19 Nov 2019 09:45:35 +0000 (10:45 +0100)]
testsuite: Add a testcase for repeat nodes that don't repeat
Timm Bäder [Tue, 19 Nov 2019 09:45:02 +0000 (10:45 +0100)]
gl renderer: Add a short cut for repeat nodes that don't repeat
These happen and we don't even need to draw the child to a texture.
Timm Bäder [Tue, 19 Nov 2019 09:31:21 +0000 (10:31 +0100)]
gl renderer: Fix repeat nodes that don't repeat
Fixes #2234
Timm Bäder [Tue, 19 Nov 2019 08:37:45 +0000 (09:37 +0100)]
csstokenizer: Plug a leak
Timm Bäder [Tue, 19 Nov 2019 08:37:26 +0000 (09:37 +0100)]
rendernodeparser: Only report a GError* if we have one
Timm Bäder [Tue, 19 Nov 2019 08:37:03 +0000 (09:37 +0100)]
rendernodeparser: Handle resolving NULL urls
Emmanuele Bassi [Mon, 18 Nov 2019 14:10:40 +0000 (14:10 +0000)]
docs: Add migration note for iconify → minimize
See commit
b70e4f6de95b.
Daniel Mustieles [Mon, 18 Nov 2019 14:08:59 +0000 (15:08 +0100)]
Updated Spanish translation
Emmanuele Bassi [Mon, 18 Nov 2019 10:27:32 +0000 (10:27 +0000)]
Merge branch 'gdk-backend-imports' into 'master'
Correct Gdk backend import paths and related gtk-doc
See merge request GNOME/gtk!1197
Andy Holmes [Mon, 18 Nov 2019 08:31:38 +0000 (00:31 -0800)]
Correct Gdk backend import paths and related gtk-doc
Correct the paths in the include guard warnings and use the `@Include`
directive for the Gdk backends.
Matthias Clasen [Mon, 18 Nov 2019 01:57:55 +0000 (01:57 +0000)]
Merge branch 'seal-popover-menu' into 'master'
Privatize popover menu pieces
See merge request GNOME/gtk!925
Matthias Clasen [Mon, 18 Nov 2019 01:55:34 +0000 (01:55 +0000)]
Merge branch 'signal-naming' into 'master'
gtkstyleprovider: Rename -gtk-style-changed signal to have a valid name
See merge request GNOME/gtk!1176
Matthias Clasen [Mon, 18 Nov 2019 00:52:53 +0000 (00:52 +0000)]
Merge branch 'issue-67' into 'master'
Rename "iconify" to "minimize"
Closes #67
See merge request GNOME/gtk!1190
Emmanuele Bassi [Sat, 16 Nov 2019 20:26:31 +0000 (20:26 +0000)]
Merge branch 'meson-bump' into 'master'
Bump up the required version of Meson
See merge request GNOME/gtk!1191
Emmanuele Bassi [Sat, 16 Nov 2019 20:04:00 +0000 (20:04 +0000)]
Disable GdkSurface.minimize on Wayland
The existing xdg-shell protocols do not support minimization in a way
that allows us to implement the GdkSurface API; the only minimization
operation does not come with a state notification, nor it comes with
a way to undo itself.
Closes: #67
Emmanuele Bassi [Sat, 16 Nov 2019 19:50:57 +0000 (19:50 +0000)]
Rename "iconify" to "minimize"
The "iconified" state is mostly an X11-ism; every other platform calls
this state "minimized" because it may not involve turning a window into
an icon at all.
Emmanuele Bassi [Fri, 8 Nov 2019 15:04:41 +0000 (15:04 +0000)]
Bump up the required version of Meson
Match the one we're testing on our CI infrastructure.
Emmanuele Bassi [Sat, 16 Nov 2019 18:19:26 +0000 (18:19 +0000)]
Merge branch 'gdkx-import-doc' into 'master'
Correct GdkX11 import path in docs and include guards
Closes #2254
See merge request GNOME/gtk!1188
Andy Holmes [Fri, 15 Nov 2019 21:13:26 +0000 (13:13 -0800)]
Correct GdkX11 import path in docs and include guards
Update the include directives in the documentation, as well as the
include guards in headers, to point to gdk/x11/gdkx.h.
closes #2254
Emmanuele Bassi [Fri, 15 Nov 2019 23:26:17 +0000 (23:26 +0000)]
Merge branch 'fix-menu-check-radio-styling-gtk4' into 'master'
Adwaita: Fix check/radio styling in menu (GTK4)
See merge request GNOME/gtk!1187
Emmanuele Bassi [Fri, 15 Nov 2019 23:24:42 +0000 (23:24 +0000)]
Merge branch 'dont-hardcode-shared-library' into 'master'
build: Don't hardcode shared_library() in meson
See merge request GNOME/gtk!1172
Niklas Hambüchen [Mon, 11 Nov 2019 19:11:16 +0000 (20:11 +0100)]
Try building static libs on CI
nana-4 [Fri, 15 Nov 2019 16:08:44 +0000 (01:08 +0900)]
Adwaita: Fix check/radio styling in menu
The new check/radio style increased their specificity, but it was not
synchronized in the menu styling.
This commit increases the specificity to match the updated check/radio
styling.
https://gitlab.gnome.org/GNOME/gtk/issues/2096
Emmanuele Bassi [Fri, 15 Nov 2019 13:05:39 +0000 (13:05 +0000)]
Merge branch 'building-docs' into 'master'
Document the use of build types when configuing GTK
See merge request GNOME/gtk!1113
Emmanuele Bassi [Fri, 15 Nov 2019 12:36:12 +0000 (12:36 +0000)]
Merge branch 'Master_checkradio_refresh' into 'master'
Refresh check/radio styling, ported from gtk3
See merge request GNOME/gtk!1175
frederik.feichtmeier [Fri, 15 Nov 2019 12:16:07 +0000 (13:16 +0100)]
Refresh check/radio styling, ported from gtk3
Emmanuele Bassi [Thu, 14 Nov 2019 16:30:49 +0000 (16:30 +0000)]
Merge branch 'fix-emoji-picker-styling' into 'master'
Adwaita: Fix emoji picker styling (GTK4)
See merge request GNOME/gtk!1181
nana-4 [Thu, 14 Nov 2019 15:04:18 +0000 (00:04 +0900)]
Adwaita: Fix emoji picker styling
- Adjust the emoji picker appearance to be the same as gtk3's.
- Fix button.emoji-section margins in RTL.
- Prevent the .emoji hover effect from being applied to the entire
nested popover.
Kjell Ahlstedt [Wed, 13 Nov 2019 14:20:34 +0000 (15:20 +0100)]
headerbar: Disconnect signal handlers when children are removed
The signal handler that calls notify_child_cb() is disconnected
from a child widget before the child is removed from the header bar.
gtk_header_bar_dispose() chains up before destroying the start and end
boxes, thus avoiding calls to notify_child_cb() after start_box and
end_box have been cleared.
Fixes #2246
Timm Bäder [Sat, 26 Oct 2019 16:22:27 +0000 (18:22 +0200)]
inspector: Select an object when activating it
Timm Bäder [Thu, 7 Nov 2019 06:32:03 +0000 (07:32 +0100)]
css: short-circuit gtk_css_dimension_value_try_add
No need to allocate a new css value for something that we already have,
because one of the two values is 0
Timm Bäder [Thu, 7 Nov 2019 06:31:04 +0000 (07:31 +0100)]
cssdimenstionvalue: Add common degree value singletons
Timm Bäder [Thu, 7 Nov 2019 06:30:42 +0000 (07:30 +0100)]
cssdimensionvalue: Add 50% singleton
Also pretty common
Timm Bäder [Thu, 7 Nov 2019 06:29:45 +0000 (07:29 +0100)]
cssdimensionvalue: Add more common pixel values
These are used for icon sizes, etc.
Timm Bäder [Thu, 7 Nov 2019 05:49:43 +0000 (06:49 +0100)]
cssimagerecolor: Avoid copying colors
Timm Bäder [Fri, 25 Oct 2019 08:36:29 +0000 (10:36 +0200)]
popover: Use a bin layout for the contents gizmo
Timm Bäder [Fri, 25 Oct 2019 08:35:53 +0000 (10:35 +0200)]
testpopover: Plug two GtkBuilder leaks
Timm Bäder [Wed, 13 Nov 2019 14:29:01 +0000 (14:29 +0000)]
Merge branch 'wip/christopherdavis/issue-2233' into 'master'
Adwaita: remove unwanted spacing for boxes as titlebars
Closes #2233
See merge request GNOME/gtk!1177
Christopher Davis [Wed, 13 Nov 2019 00:09:10 +0000 (16:09 -0800)]
Adwaita: remove unwanted spacing for boxes as titlebars
A GtkBox in a titlebar could have unwanted spacing.
This caused a glitch in split-header applications where
parts of the titlebar would be transparent or black.
This commit tweaks Adwaita to make sure no spacing is added for boxes when used as titlebars.
Fixes #2233
Timm Bäder [Wed, 13 Nov 2019 10:40:02 +0000 (10:40 +0000)]
Merge branch 'master.msvc.fix' into 'master'
gtk/gtkcssrgbavalue.c: Fix build on Visual Studio
See merge request GNOME/gtk!1178
Chun-wei Fan [Wed, 13 Nov 2019 09:14:31 +0000 (17:14 +0800)]
gtk/gtkcssrgbavalue.c: Fix build on Visual Studio
Visual Studio does not allow static or global structures to use
static storage duration by compound literals, which is actually a
GCCism[1].
[1]: See https://gcc.gnu.org/onlinedocs/gcc/Compound-Literals.html
Philip Withnall [Tue, 12 Nov 2019 19:51:33 +0000 (19:51 +0000)]
gtkstyleprovider: Rename -gtk-style-changed signal to have a valid name
Signal names must start with a letter. They can’t start with a hyphen.
It was originally added in commit
74f4c6f6bd755967 with no given reason
for why the signal name was chosen as it was.
Signed-off-by: Philip Withnall <withnall@endlessm.com>
Emmanuele Bassi [Mon, 11 Nov 2019 16:11:06 +0000 (16:11 +0000)]
Merge branch 'issue-2230' into 'master'
Add GtkCss API to the introspection data
Closes #2230
See merge request GNOME/gtk!1173
Emmanuele Bassi [Mon, 11 Nov 2019 15:53:09 +0000 (15:53 +0000)]
Add GtkCss API to the introspection data
Some of the CSS API has been moved to a public namespace, so we need to
include it into the introspection data we build in order for people to
use it.
Fixes: #2230
Niklas Hambüchen [Mon, 11 Nov 2019 15:37:46 +0000 (16:37 +0100)]
build: Don't hardcode shared_library() in meson.
Instead, use the standard library().
This is a meson best practice.
Fixes -Ddefault_library=static not having any effect.
Emmanuele Bassi [Tue, 1 Oct 2019 15:27:23 +0000 (16:27 +0100)]
docs: Rename SGML files
We've been using XML for ages.
Emmanuele Bassi [Tue, 1 Oct 2019 15:21:40 +0000 (16:21 +0100)]
docs: Fix the XML indentation
Emmanuele Bassi [Tue, 1 Oct 2019 15:20:37 +0000 (16:20 +0100)]
docs: We run meson, not configure
Emmanuele Bassi [Tue, 1 Oct 2019 15:19:12 +0000 (16:19 +0100)]
docs: Add a section on supported build types
GTK uses the Meson `buildtype` option to determine whether to enable or
disable debugging code and safeties. We should document our behaviour
and expectations.
Matthias Clasen [Mon, 11 Nov 2019 10:58:43 +0000 (11:58 +0100)]
Privatize popover menu pieces
Don't allow manual creation of popover menus
anymore. This lets us also make GtkModelButton
private
Piotr Drąg [Sun, 10 Nov 2019 11:45:22 +0000 (12:45 +0100)]
Update Polish translation
Daniel Mustieles [Fri, 8 Nov 2019 11:44:39 +0000 (12:44 +0100)]
Updated Spanish translation
Timm Bäder [Thu, 7 Nov 2019 11:56:17 +0000 (11:56 +0000)]
Merge branch 'adwaita-emoji-picker-adjustments-gtk4' into 'master'
Adwaita: Emoji picker adjustments
See merge request GNOME/gtk!1160
Alex Monday [Sun, 3 Nov 2019 08:38:11 +0000 (08:38 +0000)]
Adwaita: Emoji picker adjustments
- Add margins for search entry;
- Increase side margins for emoji-section buttons box;
- Apply border-radius on hovered emoji;
- Adjust indication of hovered emoji-section button.
Benjamin Otte [Tue, 5 Nov 2019 19:08:22 +0000 (19:08 +0000)]
Merge branch 'kill-entry-buffer-demo' into 'master'
gtk-demo: Drop the entry buffer demo
See merge request GNOME/gtk!1166
Benjamin Otte [Tue, 5 Nov 2019 00:10:22 +0000 (01:10 +0100)]
scrolledwindow: Use dispose(), not destroy()
Benjamin Otte [Tue, 5 Nov 2019 18:52:25 +0000 (18:52 +0000)]
Merge branch 'wip/chergert/textundo' into 'master'
Add undo/redo support for GtkTextView, GtkText, and GtkEntry
See merge request GNOME/gtk!1158
Matthias Clasen [Tue, 5 Nov 2019 18:44:49 +0000 (18:44 +0000)]
gtk-demo: Drop the entry buffer demo
We all agree that entry buffers are not something
we should promote in demos.
Christian Hergert [Mon, 4 Nov 2019 22:14:42 +0000 (14:14 -0800)]
migration: add GtkEntryBuffer::deleted-text to migration guide
Christian Hergert [Fri, 1 Nov 2019 18:30:33 +0000 (11:30 -0700)]
gtk-demo: set irreversable actions for textview demos
Christian Hergert [Fri, 1 Nov 2019 18:20:22 +0000 (11:20 -0700)]
gtk-demo: add a demo for TextView undo/redo
Christian Hergert [Fri, 1 Nov 2019 18:20:02 +0000 (11:20 -0700)]
gtk-demo: add an undo demo for GtkEntry
Christian Hergert [Fri, 1 Nov 2019 18:18:21 +0000 (11:18 -0700)]
gtk-demo: wrap text operations in irreversible actions
This ensures that the actions to set the text for the demo tabs cannot
be undone. This matches the previous behavior for GtkTextBuffer.
Christian Hergert [Fri, 1 Nov 2019 18:13:30 +0000 (11:13 -0700)]
text: add undo support to GtkText
This adds support using the GtkTextHistory helper for undo/redo to the
GtkText widget. It is similar in use to GtkTextView, but with a simplified
interface.
You can disable undo support using the GtkText:enable-undo property. By
default, it is enabled.
Christian Hergert [Fri, 1 Nov 2019 18:15:35 +0000 (11:15 -0700)]
entrybuffer: remove text in ::deleted-text default handler
This changes the semantics of ::deleted-text to perform the removal of
text in the default handler. This means, that if you want the old behavior
where your signal handler is called after the text has been deleted, you
should connect with G_CONNECT_AFTER in your signal handler (or use
g_signal_connect_after).
Without this change, there was never a way to get the deleted-text before
the operation had completed and this is necessary to provide undo support
to the text widgets.
Christian Hergert [Tue, 5 Nov 2019 00:40:02 +0000 (16:40 -0800)]
editable: add enable-undo property
This property is intended to be mapped to a GtkText so that undo/redo
support can be used from a number of editable widgets.
Christian Hergert [Fri, 1 Nov 2019 18:12:21 +0000 (11:12 -0700)]
textview: add undo/redo support to GtkTextView
This builds upon the GtkTextHistory helper to provide undo and redo support
for the GtkTextView widget and GtkTextBuffer object.
You can undo/redo using familiar shortcuts such as Primary+Z,
Primary+Shift+Z, ad Primary+Y.
Developers that wish to disable undo, should set the
GtkTextBuffer:enable-undo property to FALSE.
You can wrap irreversible actions
gtk_text_buffer_begin_irreversible_action() and
gtk_text_buffer_end_irreversible_action(). This will cause the undo stack
to drop all undo/redo actions and the changes made between them will be
the "initial state" of the buffer.
Calling gtk_text_buffer_set_text() will do this automatically for you.
Christian Hergert [Thu, 24 Oct 2019 02:13:11 +0000 (19:13 -0700)]
texthistory: add GtkTextHistory helper
The GtkTextHistory helper provides the fundamental undo/redo stack that
can be integrated with other text widgets. It allows coalescing related
actions to reduce both the number of undo actions to the user as well as
the memory overhead.
A new istring helper is used by GtkTextHistory to allow for "inline
strings" that gracefully grow to using allocations with g_realloc(). This
ensure that most undo operations require no additional allocations other
than the struct for the action itself.
A queue of undoable and redoable actions are maintained and the link for
the queue is embedded in the undo action union. This allows again, for
reducing the number of allocations involved for undo operations.
Daniel Mustieles [Tue, 5 Nov 2019 14:44:34 +0000 (15:44 +0100)]
Updated Spanish translation
Emmanuele Bassi [Tue, 5 Nov 2019 10:44:05 +0000 (10:44 +0000)]
ci: Allow msys2 jobs to fail
The msys2 runner has started failing for internal reasons:
- gtk-3-24 times out
- master fails with a ld.exe assertion:
BFD (GNU Binutils) 2.33.1 assertion fail
../../binutils-2.33.1/bfd/cofflink.c:2348
Both seem related to some MSYS2 issue. Until the runner is updated, we
should not block on it.
Emmanuele Bassi [Mon, 4 Nov 2019 23:46:22 +0000 (23:46 +0000)]
tests: Add label-sizing.ui to the XFAIL list
Changes in Pango may make this test fail.
Emmanuele Bassi [Mon, 4 Nov 2019 23:35:49 +0000 (23:35 +0000)]
Revert "Adwaita: radios & checkboxes styling updates"
This reverts commit
427b5d187c8ca5f099b5d4f84664ccc6a560a919.
The commit breaks Adwaita:
Theme parsing error: gtk-contained.css:1191:28-44: No property named "-gtk-icon-effect"
Matthias Clasen [Mon, 4 Nov 2019 23:24:49 +0000 (23:24 +0000)]
Move the ifdef to the right spot
Matthias Clasen [Mon, 4 Nov 2019 23:14:44 +0000 (23:14 +0000)]
cell text: Handle new pango enum values
The PangoUnderline enum grew some new values.
Jakub Steiner [Mon, 4 Nov 2019 18:41:58 +0000 (19:41 +0100)]
Adwaita: radios & checkboxes styling updates
- port from gtk3
Benjamin Otte [Mon, 4 Nov 2019 17:46:28 +0000 (17:46 +0000)]
Merge branch 'wip/sadiq/fix-leak' into 'master'
selection-output-stream-x11: Fix a memory leak
See merge request GNOME/gtk!1149